import request from '@/util/request'

export const getCart = () => {
    return request({
        url:`/cartList`,
        method:'get'
    })
}

export const modifyCount = (data) => {
    return request({
        url:'/cartList/countChange',
        method:'post',
        data: data
    })
}
export const addCart = (data) => {
    return request({
        url:'/addCart',
        method:'post',
        data:data
    })
}

export const deleteCart = (data) => {
    return request({
        url:`/deleteCart`,
        method:'post',
        data:data
    })
}

export const orderGet = () => {
    return request({
        url:`/orderGet`,
        method:'get'
    })
}
export const orderCreate = (data) => {
    return request({
        url:'/orderCreate',
        method:'post',
        data:data
    })
}

export const orderSubmit = (data) => {
    return request({
        url:'/orderSubmit',
        method:'post',
        data:data
    })
}
// 获取已支付可以评价的订单
export const hasPayList = () => {
    return request({
        url:`/orderGetRmk`,
        method:'get'
    })
}

// 获取未支付的订单
export const noPayList = () => {
    return request({
        url:`/orderGetNoPay`,
        method:'get'
    })
}